package com.github.baichuan.application.scaffold.config;

import com.github.baichuan.application.scaffold.security.PasswordSecurityProvider;
import com.github.baichuan.utils.SnowFlake;
import com.github.baichuan.web.security.Md5Encryption;
import com.github.baichuan.web.security.PasswordEncryption;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
//@Import(value = ResponseAuthorizationAdvise.class)
public class Component {
    @Bean
    public SnowFlake snowFlake(){
        return SnowFlake.DEFAULT;
    }

    @Bean
    public PasswordEncryption passwordEncryption() {
        return new Md5Encryption();
    }

    @Bean
    public PasswordSecurityProvider passwordSecurityProvider(){
        return new PasswordSecurityProvider();
    }
}
